package com.novel.entiy.dto;

import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.validation.constraints.Email;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.Size;

/**
 * @author chihuo
 * @date 2022/4/6
 */
@Data
public class RegisterDTO {

    @Size(min = 6, max = 16, message = "用户名长度限制在6-16位")
    @NotBlank(message = "用户名不能为空")
    @ApiModelProperty("用户名")
    private String username;

    @Size(min = 6, max = 16, message = "密码长度限制在6-16位")
    @NotBlank(message = "密码不能为空")
    @ApiModelProperty("密码")
    private String password;

    @NotBlank
    @ApiModelProperty("邮箱验证码")
    private String code;

    @Email(message = "邮箱格式不正确")
    @NotBlank
    @ApiModelProperty("邮箱")
    private String email;
}
